<?Php
	session_start();
	require_once('../includes/user.php');
	$user=new User();
	$in_ad=$user->query("select * from dashboard where status=0 ");
	$p=mysql_num_rows($in_ad);
	$cnt=1;
?>
<link href="../css/default.css" rel="stylesheet" type="text/css">

<table width="665" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div class="Innerheading">My Inbox</div></td>
  </tr>
  <tr>
    <td><div class="InnerDarkbox">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <?php
	  if($p>0)
	  {
	   ?>
        <tr>
          <td height="20" align="center" valign="middle" class="head">&nbsp;</td>
          <td align="center" valign="middle" class="head">&nbsp;</td>
          <td align="center" valign="middle" class="head">Request / Message</td>
          <td align="center" valign="middle" class="head">action</td>
        </tr>
        <tr>
          <td width="11" height="20" class="head">&nbsp;</td>
          <td width="18" class="head">&nbsp;</td>
          <td width="338" class="head">&nbsp;</td>
          <td width="95" class="head">&nbsp;</td>
        </tr>
        <?php
			if(mysql_num_rows($in_ad)>0)
			{
				while($in_row=mysql_fetch_array($in_ad))
				{
		?>
        <tr>
          <td height="20" align="right" valign="middle">&nbsp;</td>
          <td align="left" valign="top" class="head"><?php echo $cnt; ?></td>
          <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="69%" class="head"><?php $use=$user->getUserProfile($in_row['profile']);
			  echo $use['name'];
			   ?></td>
              <td width="31%">On <?php echo $in_row['history']; ?></td>
            </tr>
            <tr>
              <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2"><blockquote class="profile"><?Php echo $in_row['comment']; ?></blockquote></td>
              </tr>
          </table></td>
          <td align="center" valign="middle"><span onClick="mkread(<?php echo $in_row['id']; ?>)" class="smartlink">Make as read</span></td>
        </tr>
        <tr>
          <td height="20" align="right" valign="middle">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <?php
				$cnt++;
				}
			}
		}
		else
		{
		?>
        <div align="center">There are no messages in your inbox !!!</div>
        <?php
		}
		?>
      </table>
    </div></td>
  </tr>
</table>
